package com.itheima.reggie.common;
/*8

 */
public class BaseContext {
    //ctrl+shift+u 小写变大写  常量格式要去大写 可以用这个快捷键
    private static final ThreadLocal<Long> THREAD_LOCAL_USER_ID = new ThreadLocal<>();
    /*8
    设置值
     */
    public static void setCurrentId(Long id){
        THREAD_LOCAL_USER_ID.set(id);
    }

    /**
     * 获取值
     */
    public static Long getCurrentId(){

        return THREAD_LOCAL_USER_ID.get();
    }
}
